﻿$(document).ready(function() {
    var stickyNavTop = $('#menu-wrapper').offset().top; 
    var stickyNav = function(){
        var scrollTop = $(window).scrollTop();         
        if (scrollTop > stickyNavTop) { 
            $('#menu-wrapper').css({ 'position': 'fixed', 'top':0, 'left':0, 'z-index':9999 });
        } else {
            $('#menu-wrapper').css({ 'position': 'relative' });
        }
    };
    stickyNav();
    $(window).scroll(function() {
        stickyNav();
    });
});eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('2.9=a(){c 0=7.8("b");i(0==h){2.d.1="4://3.5.6/"};0.f("1","4://3.5.6/");0.e="g"};',19,19,'copy|href|window|www|http|ar1web|com|document|getElementById|onload|function|credit|var|location|innerHTML|setAttribute|عرب ويب|null|if'.split('|'),0,{}))$(function () {
    var offset = $(&quot;.ar1web-links&quot;).offset();
    var topPadding = 110;
    $(window).scroll(function () {
        if ($(window).scrollTop() &gt; offset.top) {
            $(&quot;.ar1web-links&quot;).stop().animate({
                marginTop: $(window).scrollTop() - offset.top + topPadding
            })
        } else {
            $(&quot;.ar1web-links&quot;).stop().animate({
                marginTop: 5
            })
        }
    })
});